﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WastedMechanics
{
    public class GuiButton : GuiTextLabel
    {
        public string MouseOverMaterial;
        public string MouseDownMaterial;
        public string MouseOutMaterial;
        
        public GuiButton(string name)
            : base(name)
        {
        }

        protected override bool ProcessInput()
        {
            if (base.ProcessInput())
            {
                if (IsMouseIn)
                {
                    if (Engine.MouseInput.ButtonDown(MOIS.MouseButtonID.MB_Left))
                    {
                        MaterialName = MouseDownMaterial;
                        return false;
                    }
                    else
                        MaterialName = MouseOverMaterial;
                }
                else
                    MaterialName = MouseOutMaterial;

                return true;
            }
            else
                return false;
        }        
    }
}
